﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using BUSINESS_OBJECT;

namespace CRM
{
    public partial class adminlogin : System.Web.UI.Page
    {
        admincls admn = new admincls();
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button2_Click(object sender, EventArgs e)
        {
            DataTable dt = admn.GetRecords(-99, txtun.Text, txtpwd.Text, false, " and ");
            if (dt.Rows.Count > 0)
            {
                Session["userid"] = dt.Rows[0]["ID"].ToString();

                Response.Redirect("~/admin/HOME.aspx");
            }
            else
                Label1.Text = "invalid usre name password";

        }
    }
}
